package com.dbf.forum.core.produit;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.dbf.forum.common.core.ModelObject;
import com.dbf.forum.user.model.User;
import com.dbf.forum.user.model.UserDto;

@Entity
@Table(name = "Produit")
public class Produit extends ModelObject implements Serializable{

	private static final long serialVersionUID = -3407639808787992479L;

	@Id()
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "P_ID")
	private long id;
	
	@Column(name = "nom")
	private String nom;
	
	@Column(name = "prixDepart")
	private Double prixDepart;
	
	@Column(name = "description")
	private String description;
	
	@ManyToOne
	@JoinColumn(name = "V_ID")
	private User vendeur;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public Double getPrixDepart() {
		return prixDepart;
	}

	public void setPrixDepart(Double prixDepart) {
		this.prixDepart = prixDepart;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public User getVendeur() {
		return vendeur;
	}

	public void setVendeur(User vendeur) {
		this.vendeur = vendeur;
	}

}
